package com.doraro.coal.controller;

import com.doraro.coal.exception.R;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Controller
@RequestMapping("/anon")
public class LoginController {


    @GetMapping(value = {"/", "index"})
    public String index() {
        return "index";
    }




    @PostMapping("/register")
    @ResponseBody
    public R register(@RequestBody Map<String, String> param) {
        return R.success();
    }

    @GetMapping("/register")
    public String goRegister() {
        return "user/register";
    }

    @GetMapping("/main")
    public String goMain() {
        return "main";
    }
}

